Node JS: The most Simple and Effective Introduction to Learning Node By Jesse Smith by Smith Jesse

Node JS: The most Simple and Effective Introduction to Learning Node By Jesse Smith by Smith Jesse

Author:Smith, Jesse [Smith, Jesse]
Language: eng
Format: mobi
Published: 2015-05-16T16:00:00+00:00


Find Paths

Node can tell you where in the file system Node is working using the _filename and _dirname variables. The first variable, _filename, provides the absolute path to the file executing currently, while the second variable, _dirname, provides the absolute path to the working directory where the file being executed is located. Both variables do not need to be imported from any modules as they are provided standard. A simple example using both variables appears below:

console.log("This file is " + __filename);

console.log("It's located in " + __dirname);



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.